﻿using System;
using Brjnk.GpxExplorer.ViewModel;

namespace Brjnk.GpxExplorer.Workspace.BitmapExport
{
    public class WaypointLabel : GeoObjectLabel
    {
        public WaypointLabel(Page page, LabelStyle labelStyle, ArrowStyle arrowStyle, WaypointLabelStyle waypointLabelStyle, WaypointVM waypoint)
            : base(page, labelStyle, arrowStyle)
        {
            if ((object)waypointLabelStyle == null) throw new ArgumentNullException("waypointLabelStyle");
            this.WaypointLabelStyle = waypointLabelStyle;
            this.waypoint = waypoint;
            Init();
        }

        private WaypointLabelStyle waypointLabelStyle;

        public WaypointLabelStyle WaypointLabelStyle
        {
            get { return waypointLabelStyle; }
            private set { waypointLabelStyle = value; OnPropertyChanged("WaypointLabelStyle"); }
        }

        private WaypointVM waypoint;

        public WaypointVM Waypoint
        {
            get { return waypoint; }
        }

        public override object DataObject
        {
            get { return waypoint; }
        }
    }
}